package com.hzmall.dao;

import com.hzmall.pojo.Cart;
import com.hzmall.pojo.Order;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    Order selectOrderByUserId(Integer userId);

    List<Order> selectOrdersByUserId(Integer userId);

    Order selectOrderByUserIdAndOrderNo(@Param("userId") Integer userId,@Param("orderNo") Long orderNo);

    Order selectOrderByOrderNo(Long orderNo);

    Integer countOrder();

    List<Order> selectAllOrders();

    List<Order> selectOrderByStatusAndCreateTime(@Param("status")Integer status,@Param("createTime") String createTime);
}